package models

import "gorm.io/gorm"

// 用户
type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(255)"`
}

// 角色
type Role struct {
	gorm.Model
	RoleName string `gormL:"type:varchar(50)"`
}

// 权限
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

// 用户角色表
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

// 角色权限表
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

// //////////车辆交易订单////////////
type Car struct {
	gorm.Model
	CarName string `gorm:"type:varchar(50)"`
	CarNum  int    `gorm:"type:int"`
}
type CarOrder struct {
	gorm.Model
	Cid        int    `gorm:"type:int"`
	OrderName  string `gorm:"type:varchar(50)"`
	OrderPrice int    `gorm:"type:int"`
}
type CarOrderList struct {
	OrderId    int    `gorm:"type:int"`
	CarName    string `gorm:"type:varchar(50)"`
	CarNum     int    `gorm:"type:int"`
	OrderName  string `gorm:"type:varchar(50)"`
	OrderPrice int    `gorm:"type:int"`
}

// //////////////车辆合同///////////////////
type CarCon struct {
	gorm.Model
	CarNo   string `gorm:"type:varchar(50)"`
	CarName string `gorm:"type:varchar(50)"`
	CarCode string `gorm:"type:varchar(50)"`
}
type CarContent struct {
	gorm.Model
	Cid     int    `gorm:"type:int"`
	ConCode string `gorm:"type:varchar(50)"`
	ConName string `gorm:"type:varchar(50)"`
}
type CarContentList struct {
	ConId   int    `gorm:"type:int"`
	CarNo   string `gorm:"type:varchar(50)"`
	CarName string `gorm:"type:varchar(50)"`
	CarCode string `gorm:"type:varchar(50)"`
	ConCode string `gorm:"type:varchar(50)"`
	ConName string `gorm:"type:varchar(50)"`
}

// /////////////数据信息//////////////////////
type CarType struct {
	gorm.Model
	TypeCode string `gorm:"type:varchar(50)"`
	TypeName string `gorm:"type:varchar(50)"`
}
type CarData struct {
	gorm.Model
	CarNo    string `gorm:"type:varchar(50)"`
	CarName  string `gorm:"type:varchar(50)"`
	CarPrice int    `gorm:"type:int"`
	Tid      int    `gorm:"type:int"`
}
type CarDataList struct {
	DataId   int    `gorm:"type:int"`
	TypeCode string `gorm:"type:varchar(50)"`
	TypeName string `gorm:"type:varchar(50)"`
	CarNo    string `gorm:"type:varchar(50)"`
	CarName  string `gorm:"type:varchar(50)"`
	CarPrice int    `gorm:"type:int"`
}

// ////////////////物流配送///////////////
type People struct {
	gorm.Model
	PeoNo   string `gorm:"type:varchar(50)"`
	PeoName string `gorm:"type:varchar(50)"`
	PeoNum  int    `gorm:"type:int"`
}
type PeopleOrder struct {
	gorm.Model
	Pid        int    `gorm:"type:int"`
	OrderNo    string `gorm:"type:varchar(50)"`
	OrderName  string `gorm:"type:varchar(50)"`
	OrderPrice int    `gorm:"type:int"`
}
type PeopleOrderList struct {
	OrderId    int    `gorm:"type:int"`
	PeoNo      string `gorm:"type:varchar(50)"`
	PeoName    string `gorm:"type:varchar(50)"`
	PeoNum     int    `gorm:"type:int"`
	OrderNo    string `gorm:"type:varchar(50)"`
	OrderName  string `gorm:"type:varchar(50)"`
	OrderPrice int    `gorm:"type:int"`
}
